home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
f90
/
pxfgetcwd.z
/
pxfgetcwd
Wrap
Text File
|
1998-10-30
|
3KB
|
77 lines
PXFGETCWD(3F) Last changed: 1-6-98
NNAAMMEE
PPXXFFGGEETTCCWWDD - Gets the pathname of the working directory
SSYYNNOOPPSSIISS
SSUUBBRROOUUTTIINNEE PPXXFFGGEETTCCWWDD ((_b_u_f,, _i_l_e_n,, _i_e_r_r_o_r))
CCHHAARRAACCTTEERR*_n _b_u_f
IINNTTEEGGEERR _i_l_e_n,, _i_e_r_r_o_r
IIMMPPLLEEMMEENNTTAATTIIOONN
UNICOS, UNICOS/mk, and IRIX systems
SSTTAANNDDAARRDDSS
IEEE standard interface for FORTRAN 77
DDEESSCCRRIIPPTTIIOONN
On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
default when compiling programs with the MIPSpro 7 Fortran 90 compiler
or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
7.2 F77 compiler.
The PPXXFFGGEETTCCWWDD subroutine uses the ggeettccwwdd(()) function to get the current
working directory.
When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
kind unless documented otherwise. On UNICOS and UNICOS/mk, default
kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
IRIX, the default kind is KKIINNDD==44.
The following is a list of valid arguments for this subroutine:
_b_u_f An output character variable or array element for the
current working directory. The longest pathname cannot be
longer than PPAATTHH__MMAAXX for the UNICOS operating system, or
MMAAXXPPAATTHHLLEENN for IRIX systems as defined in <<ssyyss//ppaarraamm..hh>>.
_i_l_e_n An output integer variable containing the character length
of _b_u_f.
_i_e_r_r_o_r An output integer variable that contains zero if the working
directory path was successfully copied into _b_u_f or nonzero
if PPXXFFGGEETTCCWWDD was not successful.
The PPXXFFGGEETTCCWWDD subroutine may return any of the following error values:
EETTRRUUNNCC If the length of _b_u_f is less than the complete path
length.
EEAACCCCEESSSS If read or search permission for any component of the
current working directory path was denied.
EEXXAAMMPPLLEESS
In this example, PPXXFFGGEETTCCWWDD will be called with a large buffer, which
should not cause any errors, and then with a very small buffer, which
should cause an error.
program pxftest
character*1024 path
character*10 toosmallbuff
integer pathlen, ierr
CALL PXFGETCWD(path, pathlen, ierr)
print *,'path = ',path,' - ierr = ',ierr
CALL PXFGETCWD(toosmallbuff, pathlen, ierr)
print *,'toosmallbuff = ',toosmallbuf,' - ierr = ',ierr
end
SSEEEE AALLSSOO
ggeettccwwdd(3C)
_A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
2165, for the printed version of this man page.